import {createSlice} from '@reduxjs/toolkit'

 const ticket=createSlice({
    name:"ticket",
    initialState:{
        from:'北京',
        to:'上海',
        date:Date.now(),
        onlyCRH:false
    },
    reducers:{
        upLpadCRH(state,action){
            
            state.onlyCRH=action.payload
        }
    }
})
export default ticket.reducer
export const {upLpadCRH}=ticket.actions